Field of the Invention
The present invention relates to a technique for coding moving images (video) for the compression of moving images (video), and more particularly, to a technique for coding moving images (video) using intra coding and inter coding.
Description of the Background Art
The techniques for coding moving images according to, for example, the MPEG-2 and H.264 standards, use intra coding and inter coding. Intra coding is complete within a target frame without any reference to other frames. Inter coding uses reference frames in coding a target frame.
All macroblocks constructing an I (intra coded) picture are intra coded. Macroblocks constructing a P (predicted) picture and a B (bi-directionally predicted) picture are inter coded. An I picture, whose macroblocks are all intra coded, has more code than a P or B picture. Although an I picture is coded by intra prediction under H.264, the I picture still has more code than a P or B picture.
The larger amount of code by I pictures can be a problem with systems that are required to reproduce or transmit signals with low delay. Additionally, the amount of code can change cyclically at every appearance of an I picture. Every such change in the code amount temporarily requires a large buffer size, which is inefficient.
When processing target data includes I pictures whose macroblocks are all intra coded, the I pictures may delay the data processing. Thus, the system that processes data including I pictures may fail to achieve low delay. A proposed solution to this problem is a coding technique called “intra refresh” (refreshing of intra-slices of an image), which is described in, for example, Non-patent Literature 1.
The intra refresh coding described in Non-patent Literature 1 avoids using I pictures, whose macroblocks within the frames are all intra coded. The intra refresh coding described in Non-patent Literature 1 arranges intra macroblocks in units of slices. All macroblocks within a slice of the frame are coded as intra macroblocks, for which discrete cosine transform (DCT) is performed directly without prediction. Such a slice is called an “intra slice.” In the intra refresh coding, intra slices in different frames occur at sequentially differing positions between the frames so that the intra slices fill the entire screen in fixed cycles. In other words, the intra refresh coding generates intra slices that fill the entire screen in fixed cycles (to refresh to the screen). The intra slices have less code than I pictures. Systems that perform such an intra refresh process thus requires a smaller buffer size and achieves low delay.
As described in Non-patent Literature 1, the intra refresh process causes intra blocks to be scattered across a group of pictures (GOP).
However, the above intra refresh process requires all the macroblocks in each slice to be intra coded, and also requires intra slices to occur in different frames at positions sequentially differing from one another by one line. The resulting decoded images (video) can have a lower quality. More specifically, the intra slices can appear as scanning lines (horizontal strips) in the decoded images (video) when the images are reproduced consecutively.
To solve this problem, a technique described for example in Patent Literature 1 may be used to scatter intra macroblocks in units of macroblocks.